 <include file="public:header"/>

<!-- Page -->
    <!-- Page -->
    <div class="page animsition" style="animation-duration: 800ms; opacity: 1;">
        <div class="page-content padding-30 container-fluid">
            <div class="row" data-plugin="matchHeight" data-by-row="true">

                <div class="example-wrap">
                    <div class="nav-tabs-horizontal nav-tabs-inverse">
                        <ul class="nav nav-tabs nav-tabs-solid" data-plugin="nav-tabs" role="tablist">
                            <li class="active" role="presentation">
                                <a href="#">
                                    全部
                                </a>
                            </li>
                        </ul>
                        <div class="tab-content">
                            <div class="tab-pane active">
                                <div class="alert alert-alt alert-danger alert-dismissible" role="alert">
                                    <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                                        <span aria-hidden="true">×</span>
                                    </button>
                                    <p>公网 IP （Elastic IP） 是在互联网上合法的静态 IP 地址。在亿速云中，公网 IP 地址与您的账户而非特定的资源（主机或路由器）关联，您可以将申请到的公网
                                        IP 地址分配到任意位于基础私有网络 vxnet-0 中的主机或路由器，并随时可以解绑、再分配到其他主机或路由器，如此可以快速替换您的对外主机或路由器。
                                    </p>

                                </div>
                                <a href="#" class="btn btn-danger pull-left" id="btn-create">
                                    <i class="icon wb-plus" aria-hidden="true"></i> 购买IP
                                </a>
                                <form  action="{:U('console/ip')}" class="form-inline text-right" method="post">
                                    <div class="form-group">
                                        <!--<select class="form-control" name="ds[region_id]" style="width:160px;">
                                            <option value="">机房</option>
                                                                                    </select>-->
            <!--                             <select data-plugin="selectpicker" name="ds[ks]" class="bs-select-hidden">
                                            <option value="0">IP地址</option>
                                            <option value="1">配对IP地址</option>
                                        </select> -->
                                    </div>

                                    <div class="form-group">
                                         <input type="text" value='{$Think.post.keyword}' class="form-control" name="keyword" placeholder="请输入IP精确查询" style="width:200px;">
                                    </div>
                                    <div class="form-group">
                                        <button type="submit" class="btn btn-primary btn-outline">搜索</button>
                                    </div>
                                </form>
                                <table class="table table-hover" data-selectable="selectable" data-row-selectable="true" data-page-size="10">
                                    <thead>
                                    <tr>
                                        <th class="width-50">
                                          <span class="checkbox-custom checkbox-default">
                                            <input class="selectable-all" type="checkbox">
                                            <label></label>
                                          </span>
                                        </th>
                                        <th>IP</th>
                                        <th class="hidden-xs">所属机房</th>
                                        <th>所属服务器</th>
                                        <th class="hidden-xs">带宽值（M）</th>
                                        <th class="hidden-xs">高防（G）</th>
<!--                                         <th>购买方式</th>
                                        <th>费用(月)</th> -->
                                        <th>购买时间</th>
                                        <th>到期时间</th>
                                        <th>操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                        <foreach name="orderlist"  item="vo">
                                            <tr id="tr-qyip-5886b79054bcc9-05807676">
                                                <td>
                                                    <span class="checkbox-custom checkbox-default">
                                                    <input class="selectable-item" type="checkbox" id="row-qyip-5886b79054bcc9-05807676" value="qyip-5886b79054bcc9-05807676">
                                                    <label for="row-qyip-5886b79054bcc9-05807676"></label>
                                                    </span>
                                                </td>
                                                <td id="name-qyip-5886b79054bcc9-05807676">
                                                    {$vo.ipaddress}
                                                </td>
                                                <td class="hidden-xs">{$vo.diyuname}</td>
                                                <td class="hidden-xs">云服务器-{$vo.instanceid}</td>
                                                <td class="hidden-xs" id="bandwidth-qyip-5886b79054bcc9-05807676">{$vo.internetmaxbandwidthout}</td>
                                                <td class="hidden-xs" id="high_defense-qyip-5886b79054bcc9-05807676">0</td>
                                                <td class="hidden-xs">{$vo.creationtime|date='Y/m/d',###}</td>
                                                <td class="hidden-xs">{$vo.stoptime}</td>
                                                <td>

                                                    <div class="dropdown pull-left">
                                                        <a href="javascript:void(0);" data-sn="qyip-5886b79054bcc9-05807676" class="btn-bind">绑定</a>
                                                        <a href="javascript:void(0);" data-sn="qyip-5886b79054bcc9-05807676" class="btn-unbind">解绑</a>
                                                                                                                续费
                                                            扩容
                                                                                                            <!-- <a href="javascript:void(0);" data-sn="" class="btn-del">删除</a>-->
                                                        <!--<a href="javascript:void(0);" data-sn="" class="btn-bill">账单</a>-->
                                                    </div>

                                                </td>
                                            </tr>
                                        </foreach>
                                       
                                    </tbody>
                                    <tfoot>
                                    <tr>
                                        <td colspan="13">
                                            <div class="pull-right">
                                                <div class="qypager">



</div>                                            </div>
                                            <div class="pull-right" style="width:100%;">
                                                <div class="alert alert-primary alert-dismissible" role="alert">
                                                    <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                                                        <span aria-hidden="true">×</span>
                                                    </button>
                                                    <ul style="font-size:14px;line-height:1.8;">
                                                        <li class="red">IP只能绑定同机房的云服务器.</li>
                                                        <li class="red">初次购买只是预分配IP，绑定云服务器时，如不同段IP，将会调整同段IP.</li>
                                                        <li class="red">绑定云服务器时，如不同段IP暂不能通讯，请及时联系技术调整数据.</li>
                                                    </ul>
                                                </div>
                                            </div>
                                        </td>
                                    </tr>
                                    </tfoot>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>

    <!--购买-->
<div class="modal fade" id="createModel" aria-hidden="true" aria-labelledby="createModel" role="dialog" tacreateex="-1">
    <div class="modal-dialog modal-center modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">×</span>
                </button>
                <h4 class="modal-title">购买IP</h4>
            </div>
            <div class="modal-body">
                <div class="example-grid">
                    <div class="row">
                        <div class="col-md-12">
                            <div class="form-group">
                                <label class="control-label" for="create-region">云服务器</label>
                                <div id="create-region_box">
                                    <select id="create-region" class="form-control">
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <!--<div class="col-md-6">
                            <div class="form-group">
                                <label class="control-label" for="create-bandwidth">带宽（M）</label>
                                <div id="create-bandwidth_box">
                                    <input type="text" id="create-bandwidth" class="form-control" value="1" readonly="readonly">
                                </div>
                            </div>
                        </div>-->
                        <div class="col-md-12">
                            <div class="form-group">
                                <label class="control-label" for="create-num">数量（个）</label>
                                <div id="create-num_box">
                                    <input type="text" id="create-num" class="form-control" value="1">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="control-label" for="create-month">时长</label>
                                <div id="create-month_box">
                                    <select id="create-month" class="form-control bs-select-hidden">
                                        <option value="1">1个月</option>
                                        <option value="2">2个月</option>
                                        <option value="3">3个月</option>
                                        <option value="6">半年</option>
                                        <option value="12">1年</option>
                                        <option value="24">2年</option>
                                        <option value="36">3年</option>
                                    </select><div class="btn-group bootstrap-select form-control"><button type="button" class="btn dropdown-toggle btn-default" data-toggle="dropdown" data-id="create-month" title="1个月"><span class="filter-option pull-left">1个月</span>&nbsp;<span class="bs-caret"><span class="caret"></span></span></button><div class="dropdown-menu open"><ul class="dropdown-menu inner" role="menu"><li data-original-index="0" class="selected"><a tabindex="0" class="" style="" data-tokens="null"><span class="text">1个月</span><span class="glyphicon glyphicon-ok check-mark"></span></a></li><li data-original-index="1"><a tabindex="0" class="" style="" data-tokens="null"><span class="text">2个月</span><span class="glyphicon glyphicon-ok check-mark"></span></a></li><li data-original-index="2"><a tabindex="0" class="" style="" data-tokens="null"><span class="text">3个月</span><span class="glyphicon glyphicon-ok check-mark"></span></a></li><li data-original-index="3"><a tabindex="0" class="" style="" data-tokens="null"><span class="text">半年</span><span class="glyphicon glyphicon-ok check-mark"></span></a></li><li data-original-index="4"><a tabindex="0" class="" style="" data-tokens="null"><span class="text">1年</span><span class="glyphicon glyphicon-ok check-mark"></span></a></li><li data-original-index="5"><a tabindex="0" class="" style="" data-tokens="null"><span class="text">2年</span><span class="glyphicon glyphicon-ok check-mark"></span></a></li><li data-original-index="6"><a tabindex="0" class="" style="" data-tokens="null"><span class="text">3年</span><span class="glyphicon glyphicon-ok check-mark"></span></a></li></ul></div></div>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="control-label" for="create-money">费用（元）</label>
                                <div id="create-money_box">
                                    <input type="text" id="create-money" class="form-control" disabled="">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="control-label" for="create-account">帐户余额（元）</label>
                                <div id="create-account_box">
                                    <input type="text" id="create-account" class="form-control" disabled="">
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <!--<table class="table table-border table-condensed" id="create-table">
                    <tr>
                        <td class="ar"><label for="create-region">云服务器</label></td>
                        <td><select id="create-region" class="form-control" style="width:88%;"></select></td>
                    </tr>
                    <tr style="display:none;">
                        <td class="ar"><label for="create-bandwidth">带宽（M）</label></td>
                        <td><input type="text" id="create-bandwidth" class="form-control" style="width:88%;" value="1"></td>
                    </tr>
                    <tr>
                        <td class="ar"><label for="create-num">数量（个）</label></td>
                        <td><input type="text" id="create-num" class="form-control" style="width:88%;" value="1"></td>
                    </tr>
                    <tr>
                        <td class="ar"><label for="create-month">时长</label></td>
                        <td>
                            <select id="create-month" class="form-control" style="width:88%;">
                                <option value="1">1个月</option>
                                <option value="2">2个月</option>
                                <option value="3">3个月</option>
                                <option value="6">半年</option>
                                <option value="12">1年</option>
                                <option value="24">2年</option>
                                <option value="36">3年</option>
                            </select>
                        </td>
                    </tr>
                    <tr class="ar">
                        <td><label for="create-money">费用（元）</label></td>
                        <td><input type="text" id="create-money" class="form-control" style="width:88%;" disabled></td>
                    </tr>
                    <tr>
                        <td class="ar"><label for="create-account">帐户余额（元）</label></td>
                        <td><input type="text" id="create-account" class="form-control" style="width:88%;color:#00a157;" disabled></td>
                    </tr>
                </table>-->
                <p class="red">购买IP后，该服务器会自动重启完成绑定.</p>
                <p class="red">IP只能绑定同机房的云服务器.</p>
                <p class="red">初次购买只是预分配IP，绑定云服务器时，如不同段IP，将会调整同段IP.</p>
            </div>
            <div class="modal-footer" id="create-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-danger" id="create-submit">购买</button>
            </div>
        </div>
    </div>
</div>    <!--绑定IP-->
<div class="modal fade" id="bindModel" aria-hidden="true" aria-labelledby="bindModel" role="dialog" tabindex="-1">
    <div class="modal-dialog modal-center">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">×</span>
                </button>
                <h4 class="modal-title">绑定IP到服务器</h4>
            </div>
            <div class="modal-body">
                <div class="form-group">
                    <h4>
                        您确认将对
                        <a href="javascript:void(0);">
                            IP: <span id="bind-name"></span> <span class="caret"></span>
                        </a>
                        执行绑定操作？
                    </h4>
                </div>
                <div style="max-height:300px;overflow-y:auto;">
                    <table class="table table-border table-condensed" id="bind-table">
                        <thead>
                        <tr>
                            <th></th>
                            <th>服务器名称</th>
                            <th>参数</th>
                        </tr>
                        </thead>
                        <tbody id="bind-list"></tbody>
                    </table>
                </div>
                <div class="text-danger" style="line-height:1.7;">绑定IP，服务器会重启，请确保数据保存。</div>
            </div>
            <div class="modal-footer" id="bind-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-danger" id="bind-submit">绑定</button>
            </div>
        </div>
    </div>
</div>    <!--解绑IP-->
<div class="modal fade" id="unbindModel" aria-hidden="true" aria-labelledby="unbindModel" role="dialog" taunbindex="-1">
    <div class="modal-dialog modal-center">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">×</span>
                </button>
                <h4 class="modal-title">解绑公网IP</h4>
            </div>
            <div class="modal-body">
                <div class="form-group">
                    <h4>
                        您确认将对
                        <a href="javascript:void(0);">
                            IP: <span id="unbind-name"></span> <span class="caret"></span>
                        </a>
                        执行解绑操作？
                    </h4>
                    <table class="table table-border table-condensed" id="unbind-table">
                        <thead>
                        <tr>
                            <th>已绑定服务器</th>
                            <th>参数</th>
                        </tr>
                        </thead>
                        <tbody id="unbind-list"></tbody>
                    </table>
                    <p class="text-danger martop8">解绑IP，服务器会重启，请先确认数据保存，解绑后可能会影响您的业务，请提前做好准备。</p>
                </div>
            </div>
            <div class="modal-footer" id="unbind-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-danger" id="unbind-submit">解绑</button>
            </div>
        </div>
    </div>
</div>    <!--续费IP-->
<div class="modal fade" id="renewModel" aria-hidden="true" aria-labelledby="renewModel" role="dialog" tarenewex="-1">
    <div class="modal-dialog modal-center">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">×</span>
                </button>
                <h4 class="modal-title">IP带宽续费</h4>
            </div>
            <div class="modal-body">
                <div class="form-group">
                    <h4>
                        续费对象：<span class="text-danger" id="renew-name">0.0.0.0</span> <span class="b red" id="renew-org-bandwidth"> M</span>
                    </h4>
                </div>
                <table class="table table-border table-condensed" id="renew-table">

                    <tbody><tr>
                        <td style="width:100px;"><label class="control-label" for="charge-cycle">时长：</label></td>
                        <td>
                            <div class="btn-group btn-group-sm" aria-label="Small button group" role="group" id="charge-cycle">
                                <button type="button" class="btn btn-outline btn-primary renewmouth" value="1">1个月</button>
                                <button type="button" class="btn btn-outline btn-primary renewmouth" value="2">2个月</button>
                                <button type="button" class="btn btn-outline btn-primary renewmouth" value="3">3个月</button>
                                <button type="button" class="btn btn-outline btn-primary renewmouth" value="6">半年</button>
                                <button type="button" class="btn btn-outline btn-primary renewmouth active" value="12">1年</button>
                                <button type="button" class="btn btn-outline btn-primary renewmouth" value="24">2年</button>
                                <button type="button" class="btn btn-outline btn-primary renewmouth" value="36">3年</button>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>所需金额：</td>
                        <td>
                            <span class="text-danger" id="renew-money">0.00</span>
                        </td>
                    </tr>
                    <tr>
                        <td>帐户余额：</td>
                        <td>
                            <span class="text-success" id="renew-account">0.00</span>
                        </td>
                    </tr>
                </tbody></table>
                <p class="text-warning">IP只能绑定同机房的云服务器</p>
            </div>
            <div class="modal-footer" id="renew-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-danger" id="renew-submit">续费</button>
            </div>
        </div>
    </div>
</div>    <!--扩容IP-->
<div class="modal fade" id="upgradeModel" aria-hidden="true" aria-labelledby="upgradeModel" role="dialog" taupgradeex="-1">
    <div class="modal-dialog modal-center">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">×</span>
                </button>
                <h4 class="modal-title">对IP带宽扩容</h4>
            </div>
            <div class="modal-body">
                <table class="table table-border table-condensed" id="upgrade-table">
                    <tbody><tr>
                        <td class="ar"><label for="upgrade-region">原IP带宽</label></td>
                        <td><span id="upgrade-name">0.0.0.0</span> <span class="b red" id="upgrade-org-bandwidth"> M</span></td>
                    </tr>
                    <tr>
                        <td class="ar"><label for="upgrade-bandwidth">带宽（M）</label></td>
                        <td><input type="text" id="upgrade-bandwidth" class="form-control" style="width:160px;" value="1"></td>
                    </tr>
                    <tr class="ar">
                        <td><label for="upgrade-money">费用（元）</label></td>
                        <td><input type="text" id="upgrade-money" class="form-control" style="width:160px;" disabled=""></td>
                    </tr>
                    <tr>
                        <td class="ar"><label for="upgrade-account">帐户余额（元）</label></td>
                        <td><input type="text" id="upgrade-account" class="form-control" style="width:160px;color:#00a157;" disabled=""></td>
                    </tr>
                </tbody></table>
                <div class="text-danger" style="line-height:1.7;display:none;">绑定IP，服务器会重启，请确保数据保存。</div>
                <p class="text-danger" style="line-height:1.7;">暂不支持在线升级，请联系客客服：
                    <a href="http://kefu.qycn.com/vclient/chat/?websiteid=128405&amp;groupid=41815" target="_blank" title="亿速云主机">
                        <img src="../files/cclient.png" alt="亿速云主机在线客户" title="亿速云主机在线客户" style="height:25px;"> </a>

                </p>
            </div>
            <div class="modal-footer" id="upgrade-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-danger" id="upgrade-submit" disabled="">确定扩容</button>
            </div>
        </div>
    </div>
</div>    <!--删除IP-->
<div class="modal fade" id="delModel" aria-hidden="true" aria-labelledby="delModel" role="dialog" tadelex="-1">
    <div class="modal-dialog modal-center">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">×</span>
                </button>
                <h4 class="modal-title">删除公网IP</h4>
            </div>
            <div class="modal-body">
                <div class="form-group">
                    <h4>
                        您确认将对
                        <a href="javascript:void(0);">
                            IP: <span id="del-name"></span> <span class="caret"></span>
                        </a>
                        执行删除操作？
                    </h4>
                    <p class="text-warning martop8">删除后，可能会影响您的业务，请提前做好准备。</p>
                </div>
            </div>
            <div class="modal-footer" id="del-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-danger" id="del-submit">绑定删除</button>
            </div>
        </div>
    </div>
</div>    <!--帐单-->
<div class="modal fade" id="billModel" aria-hidden="true" aria-labelledby="billModel" role="dialog" tabillex="-1">
    <div class="modal-dialog modal-center">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">×</span>
                </button>
                <h4 class="modal-title">IP <span id="bill-name"></span> 帐单</h4>
            </div>
            <div class="modal-body">
                <div style="max-height:300px;overflow-y:auto;">
                    <table class="table table-border table-condensed" id="bill-table">
                        <thead>
                        <tr>
                            <th>时间</th>
                            <th>服务器名称</th>
                            <th>费用</th>
                        </tr>
                        </thead>
                        <tbody id="bill-list"></tbody>
                    </table>
                </div>
            </div>
            <div class="modal-footer" id="bill-footer">
                <button type="button" class="btn btn-danger" id="bill-submit">关闭</button>
            </div>
        </div>
    </div>
</div>
    <script>
        try {
            var urls = {
                create: '/index.php/ip/create.html',
                bind: '/index.php/ip/bind.html',
                unbind: '/index.php/ip/unbind.html',
                upgrade: '/index.php/ip/upgrade.html',
                renew: '/index.php/ip/renew.html',
                del: '/index.php/ip/del.html',
                bill: '/index.php/ip/bill.html'
            };

        } catch (e) {
        }
    </script>
<!-- End Page -->

 <include file="public:footer"/>